package java51_17;

public class StrTest2 {

	public static void main(String[] args) {
		String str = "胡仁超 like java!";
		byte[] b = str.getBytes();
		for (byte b1 : b) {
			System.out.print(b1 + " ");
		}
		System.out.println();
		System.out.println(">>>>>>>>>>>>>");
		char cr[] = str.toCharArray();
		for (char c : cr) {
			System.out.print((int) c + " ");
		}
		System.out.println();
		String s2 = "胡仁超 like JAVA!";
		boolean f = str.equals(s2);
		System.out.println(f);
		boolean f2 = str.equalsIgnoreCase(s2);
		System.out.println(f2);

		System.out.println(">>>>>>>>>>>>>>>>");
		String s5 = "Huai Nan is a good place";
		String[] sr = s5.split(" ");
		for (String s1 : sr) {
			System.out.println(s1);
		}
		String str2 = "%s 是个美丽的国家，位于 %s,面积 %7.2f万平方公里,人口 %d万";
		String s3 = String.format(str2, "刚果金共和国", "非洲东海岸", 176.49494949, 300);
		System.out.println(s3);
	}

}
